<?php

namespace app\api\controller;

use app\api\lists\TransactionDailyReportLists;
use app\api\lists\TransactionMonthlyReportLists;

class ReportController extends BaseApiController
{
    public function daily()
    {
        $params = $this->request->get();
        if (!isset($params['group_by'])) {
            return $this->fail('group_by is error');
        }

        return $this->dataLists(new TransactionDailyReportLists());
    }

    public function monthly()
    {
        $params = $this->request->get();

        return $this->dataLists(new TransactionMonthlyReportLists());
    }

}